support clean metrics of OrphanFilesCleaner#118
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds metrics support to the OrphanFilesCleaner component to track cleaning operations. It introduces a new Duration utility class to simplify timing measurements and refactors existing timing code in FileStoreScan and FileStoreCommit to use this utility.
Changes:
- Added Duration utility class for measuring operation durations in milliseconds
- Implemented CleanMetrics with 8 metric constants for tracking orphan file cleaning operations
- Added GetMetrics() method to OrphanFilesCleaner interface and implementation to expose metrics
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/paimon/core/utils/duration.h | New utility class for timing operations using high_resolution_clock |
| src/paimon/core/operation/metrics/clean_metrics.h | Defines metric name constants for clean operations |
| src/paimon/core/operation/orphan_files_cleaner_impl.h | Adds GetMetrics() method and metrics_ member |
| src/paimon/core/operation/orphan_files_cleaner_impl.cpp | Implements metrics tracking in Clean(), ListPaimonFileDirs(), and GetUsedFiles() |
| include/paimon/orphan_files_cleaner.h | Adds GetMetrics() to OrphanFilesCleaner interface |
| src/paimon/core/operation/file_store_scan.cpp | Refactors to use Duration class instead of manual chrono calls |
| src/paimon/core/operation/file_store_commit_impl.cpp | Refactors to use Duration class instead of manual chrono calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #114
Support clean metrics of OrphanFilesCleaner
Tests
No.
API and Format
No.
Documentation
No.